<template>
  <div id="app">
    <!--头部 开始-->
    <el-header>
      足彩分析系统
    </el-header>
    <!--头部 结束-->

    <!--内容 开始-->
    <el-container style="height: 850px; border: 1px solid #eee">

      <!--左侧容器--列表 开始-->
      <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
        <el-menu :unique-opened="true" @select="menuChange">
          <!--列表 基础信息列表 开始-->
          <el-submenu index="1">
            <template slot="title"><i class="el-icon-s-grid"></i>基础信息</template>
            <el-menu-item-group>
              <el-menu-item index="1-1">今日赛事</el-menu-item>
              <el-menu-item index="1-2">路径配置</el-menu-item>
              <el-menu-item index="1-3">入库配置</el-menu-item>
              <el-menu-item index="1-4">彩票公司</el-menu-item>
              <el-menu-item index="1-5">联赛类型</el-menu-item>
              <el-menu-item index="1-6">杯赛类型</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <!--列表 基础信息列表 结束-->

          <!--列表 联赛列表 开始-->
          <el-submenu index="2">
            <template slot="title"><i class="el-icon-s-grid"></i><span slot="title">联赛数据</span></template>
            <el-menu-item
                :index="'2-1-'+(key+1)" v-for="(oli,key) in openLeagueList"
                @click="loadMatchInfoByMatchTypeAndCodeAndLeagueId('league','one',oli.leagueid,1,pagesize)">
              亚盘-{{ oli.leaguetype }}
            </el-menu-item>
            <el-menu-item
                :index="'2-2-'+(key+1)" v-for="(oli,key) in openLeagueList"
                @click="loadMatchInfoByMatchTypeAndCodeAndLeagueId('league','two',oli.leagueid,1,pagesize)">
              大小-{{ oli.leaguetype }}
            </el-menu-item>
            <el-menu-item
                :index="'2-3-'+(key+1)" v-for="(oli,key) in openLeagueList"
                @click="loadMatchInfoByMatchTypeAndCodeAndLeagueId('league','three',oli.leagueid,1,pagesize)">
              欧指-{{ oli.leaguetype }}
            </el-menu-item>
          </el-submenu>
          <!--列表 联赛列表 结束-->

          <!--列表 杯赛列表 开始-->
          <el-submenu index="3">
            <template slot="title"><i class="el-icon-s-grid"></i><span slot="title">杯赛数据</span></template>
            <el-menu-item
                :index="'3-1-'+(key+1)" v-for="(ocl,key) in openCupList"
                @click="loadMatchInfoByMatchTypeAndCodeAndLeagueId('cup','one',ocl.cupid,1,pagesize)">
              亚盘-{{ ocl.cuptype }}
            </el-menu-item>
            <el-menu-item
                :index="'3-2-'+(key+1)" v-for="(ocl,key) in openCupList"
                @click="loadMatchInfoByMatchTypeAndCodeAndLeagueId('cup','two',ocl.cupid,1,pagesize)">
              大小-{{ ocl.cuptype }}
            </el-menu-item>
            <el-menu-item
                :index="'3-3-'+(key+1)" v-for="(ocl,key) in openCupList"
                @click="loadMatchInfoByMatchTypeAndCodeAndLeagueId('cup','three',ocl.cupid,1,pagesize)">
              欧指-{{ ocl.cuptype }}
            </el-menu-item>
          </el-submenu>
          <!--列表 杯赛列表 结束-->

          <!--列表 对阵列表 开始-->
          <el-submenu index="4">
            <template slot="title"><i class="el-icon-s-grid"></i><span slot="title">联赛对阵</span></template>
            <el-menu-item
                :index="'4-1-'+(key+1)" v-for="(oli,key) in openLeagueList"
                @click="loadOpposeInfoByLeagueId(oli.leagueid)">
              联阵-{{ oli.leaguetype }}
            </el-menu-item>
          </el-submenu>
          <!--列表 对阵列表 结束-->

          <!--列表 赛事全胜率 开始-->
          <el-submenu index="5">
            <template slot="title"><i class="el-icon-s-grid"></i><span slot="title">联赛全胜率</span></template>
            <el-menu-item
                :index="'5-1-'+(key+1)" v-for="(oli,key) in openLeagueList"
                @click="loadRateInfoByLeagueIdAndRateTag(oli.leagueid, 'C>B>A13')">
              联率-{{ oli.leaguetype }}-C>B>A13
            </el-menu-item>
            <el-menu-item
                :index="'5-2-'+(key+1)" v-for="(oli,key) in openLeagueList"
                @click="loadRateInfoByLeagueIdAndRateTag(oli.leagueid, 'C>A>B31')">
              联率-{{ oli.leaguetype }}-C>A>B31
            </el-menu-item>
            <el-menu-item
                :index="'5-3-'+(key+1)" v-for="(oli,key) in openLeagueList"
                @click="loadRateInfoByLeagueIdAndRateTag(oli.leagueid, 'A>B>C10')">
              联率-{{ oli.leaguetype }}-A>B>C10
            </el-menu-item>
            <el-menu-item
                :index="'5-4-'+(key+1)" v-for="(oli,key) in openLeagueList"
                @click="loadRateInfoByLeagueIdAndRateTag(oli.leagueid, 'A>C>B01')">
              联率-{{ oli.leaguetype }}-A>C>B01
            </el-menu-item>
          </el-submenu>
          <!--列表 赛事全胜率 结束-->

          <!--列表 监控功能 开始-->
          <el-submenu index="6">
            <template slot="title"><i class="el-icon-s-grid"></i>监控功能</template>
            <el-menu-item-group>
              <el-menu-item index="6-1" @click="loadMonitorAll">平均赔率全模板</el-menu-item>
              <el-menu-item index="6-2" @click="loadMonitorEasy">平赔简易模板</el-menu-item>
              <el-menu-item index="6-3" @click="loadMonitorEasyRealTime">平赔实时模板</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <!--列表 监控功能 结束-->
        </el-menu>
      </el-aside>
      <!--左侧容器--列表 结束-->

      <!--右侧容器--内容模块 开始-->
      <el-main>
        <el-drawer :visible.sync="drawer" :with-header="false" direction="ttb" size="14%">
          <div><br><br></div>
          <el-form :label-position="labelPosition" label-width="350px" :model="config">
            <el-form-item>
              python文件生成根目录&nbsp;<el-input v-model="path" style="width: 300px"></el-input>&nbsp;&nbsp;
              采集页面间隔&nbsp;<el-input v-model="sleep" style="width: 50px"></el-input>
              （秒）&nbsp;&nbsp;
              <el-button type="success" round @click="updatdConfig(path,sleep)">修改</el-button>
            </el-form-item>
          </el-form>
        </el-drawer>

        <!--投注推荐 开始-->
        <div v-if="tagIndex=='1-1'" align="center">
          <el-button type="primary" size="mini" @click="loadBetList()">获取投注推荐</el-button>
        </div>
        <el-table v-if="tagIndex=='1-1'" :data="betList">
          <el-table-column label="联赛类型/pageid/时间">
            <template slot-scope="scope">
              <span>{{ scope.row.leaguetype }}</span>
              <br>
              <span><a target="_blank"
                       :href="'https://vip.titan007.com/AsianOdds_n.aspx?id=' + scope.row.pageid + '&t=0&l=1'">{{
                  scope.row.pageid
                }}</a></span>
              <br>
              <span>{{ scope.row.matchdatetime }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="hometeam" label="主队"></el-table-column>
          <el-table-column prop="odds" label="盘口"></el-table-column>
          <el-table-column prop="guestteam" label="客队"></el-table-column>
          <el-table-column label="让/组合">
            <template slot-scope="scope">
              <span>{{ scope.row.who }}</span>
              <br>
              <span>{{ scope.row.group }}</span>
            </template>
          </el-table-column>
          <el-table-column label="abs/赔型">
            <template slot-scope="scope">
              <span>{{ scope.row.relation }}</span>
              <br>
              <span>{{ scope.row.p }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="historycai" label="历往彩"></el-table-column>
        </el-table>
        <!--投注推荐 结束-->

        <!--路径配置 开始-->
        <el-table v-if="tagIndex=='1-2'" :data="configArr">
          <el-table-column prop="path" label="python采集生成文件路径"></el-table-column>
          <el-table-column prop="sleep" label="python采集文件间隔（秒）"></el-table-column>
          <el-table-column label="操作">
            <template>
              <el-button type="primary" icon="el-icon-edit" @click="drawer = true"></el-button>
            </template>
          </el-table-column>
        </el-table>
        <!--路径配置 结束-->

        <!--入库配置 开始-->
        <el-table v-if="tagIndex=='1-3'" :data="typeInfoArr" stripe>
          <el-table-column label="python采集">
            <template slot-scope="scope">
              <!-- 苹果开关 -->
              <el-switch
                  v-model="scope.row.iscollect"
                  active-color="#13ce66"
                  inactive-color="#ccc"
                  :active-value="1"
                  :inactive-value="0"
                  inactive-text="关"
                  active-text="开"
                  @change="switchInfo('typeinfo',scope.row.id,'iscollect',scope.row.iscollect)">
              </el-switch>
            </template>
          </el-table-column>
          <el-table-column label="python入库">
            <template slot-scope="scope">
              <!-- 苹果开关 -->
              <el-switch
                  v-model="scope.row.isinsert"
                  active-color="#13ce66"
                  inactive-color="#ccc"
                  :active-value="1"
                  :inactive-value="0"
                  inactive-text="关"
                  active-text="开"
                  @change="switchInfo('typeinfo',scope.row.id,'isinsert',scope.row.isinsert)">
              </el-switch>
            </template>
          </el-table-column>
        </el-table>
        <!--入库配置 结束-->

        <!--彩票公司信息 开始-->
        <el-table v-if="tagIndex=='1-4'" :data="companyInfoArr" stripe>
          <el-table-column prop="companyid" label="companyid"></el-table-column>
          <el-table-column prop="companyname" label="公司名称"></el-table-column>
          <el-table-column label="python采集">
            <template slot-scope="scope">
              <!-- 苹果开关 -->
              <el-switch
                  v-model="scope.row.enable"
                  active-color="#13ce66"
                  inactive-color="#ccc"
                  :active-value="1"
                  :inactive-value="0"
                  inactive-text="关"
                  active-text="开"
                  @change="switchInfo('companyinfo',scope.row.id,'enable',scope.row.enable)">
              </el-switch>
            </template>
          </el-table-column>
          <el-table-column prop="ispop" label="主流公司">
            <template slot-scope="scope">
              <!-- 苹果开关 -->
              <el-switch
                  v-model="scope.row.ispop"
                  active-color="#13ce66"
                  inactive-color="#ccc"
                  :active-value="1"
                  :inactive-value="0"
                  inactive-text="非主流"
                  active-text="主 流"
                  @change="switchInfo('companyinfo',scope.row.id,'ispop',scope.row.ispop)">
              </el-switch>
            </template>
          </el-table-column>
        </el-table>
        <!--彩票公司信息 结束-->

        <!--联赛类型 开始-->
        <el-table v-if="tagIndex=='1-5'" :data="leagueInfoArr" stripe>
          <el-table-column prop="leagueid" label="联赛id"></el-table-column>
          <el-table-column prop="leaguetype" label="联赛类型"></el-table-column>
          <el-table-column prop="enable" label="python采集">
            <template slot-scope="scope">
              <!-- 苹果开关 -->
              <el-switch
                  v-model="scope.row.enable"
                  active-color="#13ce66"
                  inactive-color="#ccc"
                  :active-value="1"
                  :inactive-value="0"
                  inactive-text="关"
                  active-text="开"
                  @change="switchInfo('leagueinfo',scope.row.id,'enable',scope.row.enable)">
              </el-switch>
            </template>
          </el-table-column>
          <el-table-column prop="iscollect" label="采集状态">
            <template slot-scope="scope">
              <!-- 苹果开关 -->
              <el-switch
                  v-model="scope.row.iscollect"
                  active-color="#13ce66"
                  inactive-color="#ccc"
                  :active-value="1"
                  :inactive-value="0"
                  inactive-text="未采集"
                  active-text="已采集"
                  @change="switchInfo('leagueinfo',scope.row.id,'iscollect',scope.row.iscollect)">
              </el-switch>
            </template>
          </el-table-column>
        </el-table>
        <!--联赛类型 结束-->

        <!--杯赛类型 开始-->
        <el-table v-if="tagIndex=='1-6'" :data="cupInfoArr" stripe>
          <el-table-column prop="cupid" label="杯赛id"></el-table-column>
          <el-table-column prop="cuptype" label="杯赛类型"></el-table-column>
          <el-table-column prop="enable" label="python采集">
            <template slot-scope="scope">
              <!-- 苹果开关 -->
              <el-switch
                  v-model="scope.row.enable"
                  active-color="#13ce66"
                  inactive-color="#ccc"
                  :active-value="1"
                  :inactive-value="0"
                  inactive-text="关"
                  active-text="开"
                  @change="switchInfo('cupinfo',scope.row.id,'enable',scope.row.enable)">
              </el-switch>
            </template>
          </el-table-column>
          <el-table-column prop="iscollect" label="采集状态">
            <template slot-scope="scope">
              <!-- 苹果开关 -->
              <el-switch
                  v-model="scope.row.iscollect"
                  active-color="#13ce66"
                  inactive-color="#ccc"
                  :active-value="1"
                  :inactive-value="0"
                  inactive-text="未采集"
                  active-text="已采集"
                  @change="switchInfo('cupinfo',scope.row.id,'iscollect',scope.row.iscollect)">
              </el-switch>
            </template>
          </el-table-column>
        </el-table>
        <!--杯赛类型 结束-->

        <!--联赛数据 开始-->
        <div class="block" v-if="tagHead=='2-1' || tagHead=='2-2' || tagHead=='2-3'" align="center">
          <el-pagination @current-change="handleCurrentChange" :current-page="currentpage" :page-size="pagesize"
                         layout="total, prev, pager, next, jumper" :total="total">
          </el-pagination>
        </div>
        <el-table v-if="tagHead=='2-1' || tagHead=='2-2' || tagHead=='2-3'" :data="leagueMatchArr.list">
          <el-table-column label="赛事id/日期">
            <template slot-scope="scope">
              <span>{{ scope.row.leaguetype }}</span>
              <br>
              <span v-if="tagHead=='2-1'"><a target="_blank"
                                             :href="'https://vip.titan007.com/AsianOdds_n.aspx?id=' + scope.row.pageid + '&t=0&l=1'">{{
                  scope.row.pageid
                }}</a></span>
              <span v-else-if="tagHead=='2-2'"><a target="_blank"
                                                  :href="'https://vip.titan007.com/OverDown_n.aspx?id=' + scope.row.pageid + '&t=0&l=1'">{{
                  scope.row.pageid
                }}</a></span>
              <span v-else><a target="_blank"
                              :href="'https://1x2.titan007.com/oddslist/' + scope.row.pageid + '_2.htm'">{{
                  scope.row.pageid
                }}</a></span>
              <br>
              <span>{{ scope.row.y }}-{{ scope.row.m }}-{{ scope.row.d }}&nbsp;{{ scope.row.h }}:{{
                  scope.row.i
                }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="rounds" label="轮次"></el-table-column>
          <el-table-column label="主队/排名">
            <template slot-scope="scope">
              <span title="主队">{{ scope.row.hometeam }}</span>
              <br>
              <br>
              <span title="主队排名">{{ scope.row.r1 }}</span>
            </template>
          </el-table-column>
          <el-table-column label="完场/中场">
            <template slot-scope="scope">
              <span style="color: red" title="完场比分">{{ scope.row.eh }}-{{ scope.row.eg }}</span>
              <br>
              <br>
              <span title="中场比分">{{ scope.row.hh }}-{{ scope.row.hg }}</span>
            </template>
          </el-table-column>
          <el-table-column label="客队/排名">
            <template slot-scope="scope">
              <span title="客队">{{ scope.row.guestteam }}</span>
              <br>
              <br>
              <span title="客队排名">{{ scope.row.r2 }}</span>
            </template>
          </el-table-column>
          <el-table-column label="（胜）初/终">
            <template slot-scope="scope">
              {{ scope.row.begin }}
              <br>
              <br>
              {{ scope.row.wholebegin }}
            </template>
          </el-table-column>
          <el-table-column label="（平）初/终">
            <template slot-scope="scope">
              {{ scope.row.odds }}
              <br>
              <br>
              {{ scope.row.wholeodds }}
            </template>
          </el-table-column>
          <el-table-column label="（负）初/终">
            <template slot-scope="scope">
              {{ scope.row.end }}
              <br>
              <br>
              {{ scope.row.wholeend }}
            </template>
          </el-table-column>
          <el-table-column label="高低水" v-if="tagHead=='2-1' || tagHead=='2-2'">
            <template slot-scope="scope">
              <span v-if="scope.row.taghl=='高'" style="color: red">{{ scope.row.taghl }}</span>
              <span v-else-if="scope.row.taghl=='中'" style="color: blue">{{ scope.row.taghl }}</span>
              <span v-else-if="scope.row.taghl=='低'" style="color: green">{{ scope.row.taghl }}</span>
              <br>
              <br>
              <span v-if="scope.row.tagwhl=='高'" style="color: red">{{ scope.row.tagwhl }}</span>
              <span v-else-if="scope.row.tagwhl=='中'" style="color: blue">{{ scope.row.tagwhl }}</span>
              <span v-else-if="scope.row.tagwhl=='低'" style="color: green">{{ scope.row.tagwhl }}</span>
            </template>
          </el-table-column>
          <el-table-column label="变盘" v-if="tagHead=='2-1' || tagHead=='2-2'">
            <template slot-scope="scope">
              <span v-if="scope.row.tagud=='升'" style="color: red">{{ scope.row.tagud }}</span>
              <span v-else-if="scope.row.tagud=='同'" style="color: blue">{{ scope.row.tagud }}</span>
              <span v-else style="color: green">{{ scope.row.tagud }}</span>
            </template>
          </el-table-column>
          <el-table-column label="彩">
            <template slot-scope="scope">
              <span v-if="scope.row.cai=='3'" style="color: red">胜</span>
              <span v-else-if="scope.row.cai=='1'" style="color: blue">平</span>
              <span v-else style="color: blue">负</span>
            </template>
          </el-table-column>
        </el-table>
        <div class="block" v-if="tagHead=='2-1' || tagHead=='2-2' || tagHead=='2-3'" align="center">
          <el-pagination @current-change="handleCurrentChange" :current-page="currentpage" :page-size="pagesize"
                         layout="total, prev, pager, next, jumper" :total="total">
          </el-pagination>
        </div>
        <!--联赛数据 结束-->

        <!--杯赛数据 开始-->
        <div class="block" v-if="tagHead=='3-1' || tagHead=='3-2' || tagHead=='3-3'" align="center">
          <el-pagination @current-change="handleCurrentChange" :current-page="currentpage" :page-size="pagesize"
                         layout="total, prev, pager, next, jumper" :total="total">
          </el-pagination>
        </div>
        <el-table v-if="tagHead=='3-1' || tagHead=='3-2' || tagHead=='3-3'" :data="cupMatchArr.list">
          <el-table-column label="赛事id/日期">
            <template slot-scope="scope">
              <span>{{ scope.row.leaguetype }}</span>
              <br>
              <span v-if="tagHead=='3-1'"><a target="_blank"
                                             :href="'https://vip.titan007.com/AsianOdds_n.aspx?id=' + scope.row.pageid + '&t=0&l=1'">{{
                  scope.row.pageid
                }}</a></span>
              <span v-else-if="tagHead=='3-2'"><a target="_blank"
                                                  :href="'https://vip.titan007.com/OverDown_n.aspx?id=' + scope.row.pageid + '&t=0&l=1'">{{
                  scope.row.pageid
                }}</a></span>
              <span v-else><a target="_blank"
                              :href="'https://1x2.titan007.com/oddslist/' + scope.row.pageid + '_2.htm'">{{
                  scope.row.pageid
                }}</a></span>
              <br>
              <span>{{ scope.row.y }}-{{ scope.row.m }}-{{ scope.row.d }}&nbsp;{{ scope.row.h }}:{{
                  scope.row.i
                }}</span>
            </template>
          </el-table-column>
          <el-table-column label="主队">
            <template slot-scope="scope">
              <span title="主队">{{ scope.row.hometeam }}</span>
            </template>
          </el-table-column>
          <el-table-column label="完场/中场">
            <template slot-scope="scope">
              <span style="color: red" title="完场比分">{{ scope.row.eh }}-{{ scope.row.eg }}</span>
              <br>
              <br>
              <span title="中场比分">{{ scope.row.hh }}-{{ scope.row.hg }}</span>
            </template>
          </el-table-column>
          <el-table-column label="客队">
            <template slot-scope="scope">
              <span title="客队">{{ scope.row.guestteam }}</span>
            </template>
          </el-table-column>
          <el-table-column label="（胜）初/终">
            <template slot-scope="scope">
              {{ scope.row.begin }}
              <br>
              <br>
              {{ scope.row.wholebegin }}
            </template>
          </el-table-column>
          <el-table-column label="（平）初/终">
            <template slot-scope="scope">
              {{ scope.row.odds }}
              <br>
              <br>
              {{ scope.row.wholeodds }}
            </template>
          </el-table-column>
          <el-table-column label="（负）初/终">
            <template slot-scope="scope">
              {{ scope.row.end }}
              <br>
              <br>
              {{ scope.row.wholeend }}
            </template>
          </el-table-column>
          <el-table-column label="彩">
            <template slot-scope="scope">
              <span v-if="scope.row.cai=='3'" style="color: red">胜</span>
              <span v-else-if="scope.row.cai=='1'" style="color: blue">平</span>
              <span v-else style="color: blue">负</span>
            </template>
          </el-table-column>
        </el-table>
        <div class="block" v-if="tagHead=='3-1' || tagHead=='3-2' || tagHead=='3-3'" align="center">
          <el-pagination @current-change="handleCurrentChange" :current-page="currentpage" :page-size="pagesize"
                         layout="total, prev, pager, next, jumper" :total="total">
          </el-pagination>
        </div>
        <!--杯赛数据 结束-->

        <!--对阵数据 开始-->
        <el-table v-if="tagHead=='4-1'" :data="opposeList" stripe>
          <el-table-column label="pageid">
            <template slot-scope="scope">
              <span><a target="_blank"
                       :href="'https://vip.titan007.com/AsianOdds_n.aspx?id=' + scope.row.pageid + '&t=0&l=1'">{{
                  scope.row.pageid
                }}</a></span>
              <span><br>{{ scope.row.y }}-{{ scope.row.m }}-{{ scope.row.d }}&nbsp;{{ scope.row.h }}:{{
                  scope.row.i
                }}</span>
            </template>
          </el-table-column>
          <el-table-column label="类型">
            <template slot-scope="scope">
              <span>{{ scope.row.leagueid }}</span>
              <br>
              <span>{{ scope.row.leaguetype }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="companyid" label="公司id"></el-table-column>
          <el-table-column prop="season" label="赛季/轮次">
            <template slot-scope="scope">
              <span>{{ scope.row.season }}</span>
              <br>
              <span style="color: #0070CA">{{ scope.row.rounds }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="hometeam" label="主队">
            <template slot-scope="scope">
              <span v-if="scope.row.o3==null&&scope.row.o1==null&&scope.row.o0==null"
                    style="color: red;font-weight: bold">{{ scope.row.hometeam }}</span>
              <span v-else>{{ scope.row.hometeam }}</span>
            </template>
          </el-table-column>
          <el-table-column label="完场/中场">
            <template slot-scope="scope">
              <span style="color: red" title="完场比分">{{ scope.row.eh }}-{{ scope.row.eg }}</span>
              <br>
              <span title="中场比分">{{ scope.row.hh }}-{{ scope.row.hg }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="guestteam" label="客队">
            <template slot-scope="scope">
              <span v-if="scope.row.o3==null&&scope.row.o1==null&&scope.row.o0==null"
                    style="color: red;font-weight: bold">{{ scope.row.guestteam }}</span>
              <span v-else>{{ scope.row.guestteam }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="o3" label="初水"></el-table-column>
          <el-table-column prop="o1" label="初盘"></el-table-column>
          <el-table-column prop="o0" label="初水"></el-table-column>
          <el-table-column>
            <template slot-scope="scope">
              <span :id="'updateodds_' + scope.row.pageid" @click="updateOddsByLeagueIdAndPageIdAndSeasonAndRounds(scope.row.leagueid, scope.row.pageid, scope.row.season, scope.row.rounds)"><a href="#">更新</a></span>
            </template>
          </el-table-column>
        </el-table>
        <!--对阵数据 结束-->

        <!--胜率数据 开始-->
        <el-table v-if="tagHead=='5-1' || tagHead=='5-2' || tagHead=='5-3'  || tagHead=='5-4'" :data="rateList" stripe>
          <el-table-column prop="leaguetype" label="联赛类型"></el-table-column>
          <el-table-column label="公司id/名称">
            <template slot-scope="scope">
              <span title="公司id">{{ scope.row.companyid1 }}</span>
              <br>
              <span title="名称">{{ scope.row.companyname1 }}</span>
            </template>
          </el-table-column>
          <el-table-column label="公司id/名称">
            <template slot-scope="scope">
              <span title="公司id">{{ scope.row.companyid2 }}</span>
              <br>
              <span title="名称">{{ scope.row.companyname2 }}</span>
            </template>
          </el-table-column>
          <el-table-column label="重叠场次/共开场次">
            <template slot-scope="scope">
              <span title="共开场次">{{ scope.row.matchTotal }}</span>
              <br>
              <span title="重叠场次" style="color: #D46806">{{ scope.row.intersectTotal }}</span>
            </template>
          </el-table-column>
          <el-table-column label="abs关系/关系总场次">
            <template slot-scope="scope">
              <span title="abs关系">{{ scope.row.relation }}</span>
              <br>
              <span title="关系总场次" style="color: #D46806">{{ scope.row.reltotal }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="rel3" label="开3场次">
            <template slot-scope="scope"><span title="开3场次" style="color: red">{{ scope.row.rel3 }}</span></template>
          </el-table-column>
          <el-table-column prop="rel1" label="开1场次">
            <template slot-scope="scope"><span title="开1场次" style="color: green">{{ scope.row.rel1 }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="rel0" label="开0场次">
            <template slot-scope="scope"><span title="开0场次" style="color: blue">{{ scope.row.rel0 }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="rate31" label="胜31|30|10 / 胜3|1|0">
            <template slot-scope="scope">
              <span title="31胜率" style="color: #6F00DD">{{ scope.row.rate31 }}%</span>
              <span title="30胜率" style="color: #6F00DD">&nbsp;&nbsp;{{ scope.row.rate30 }}%</span>
              <span title="10胜率" style="color: #6F00DD">&nbsp;&nbsp;{{ scope.row.rate10 }}%</span>
              <br>
              <span title="3胜率" style="color: #D46806">{{ scope.row.rate3 }}%</span>
              <span title="1胜率" style="color: #D46806">&nbsp;&nbsp;{{ scope.row.rate1 }}%</span>
              <span title="0胜率" style="color: #D46806">&nbsp;&nbsp;{{ scope.row.rate0 }}%</span>
            </template>
          </el-table-column>
        </el-table>
        <!--胜率数据 结束-->

        <!--平均赔率全模板 开始-->
        <div v-if="tagHead=='6-1'">
          <el-table :data="avgMonitorList" stripe>
            <el-table-column label="赛事">
              <el-table-column label="联赛" width="70">
                <template scope="scope">
                  <span title="联赛">{{scope.row.leaguetype}}</span>
                </template>
              </el-table-column>
              <el-table-column label="pageid" width="70">
                <template slot-scope="scope">
                <span title="pageid">
                  <a target="_blank" :href="'https://vip.titan007.com/AsianOdds_n.aspx?id=' + scope.row.pageid + '&t=0&l=1'">{{scope.row.pageid}}</a>
                </span>
                </template>
              </el-table-column>
              <el-table-column label="周"width="34">
                <template scope="scope">
                  <span title="周">{{scope.row.week}}</span>
                </template>
              </el-table-column>
              <el-table-column label="日期" width="100">
                <template scope="scope">
                  <span title="日期">{{scope.row.matchdate}}</span>
                </template>
              </el-table-column>
              <el-table-column label="时间" width="60">
                <template scope="scope">
                  <span title="时间">{{scope.row.matchtime}}</span>
                </template>
              </el-table-column>
              <el-table-column label="状态" width="80">
                <template scope="scope">
                  <span title="状态">{{scope.row.matchstatus}}</span>
                </template>
              </el-table-column>
              <el-table-column label="主排" width="60">
                <template scope="scope">
                  <span title="主排">{{scope.row.r1}}</span>
                </template>
              </el-table-column>
              <el-table-column label="主队" width="180">
                <template scope="scope">
                  <span title="主队">{{scope.row.hometeam}}</span>
                </template>
              </el-table-column>
              <el-table-column label="全分" width="60">
                <template scope="scope">
                  <span title="全分"></span>
                </template>
              </el-table-column>
              <el-table-column label="客队" width="180">
                <template scope="scope">
                  <span title="客队">{{scope.row.guestteam}}</span>
                </template>
              </el-table-column>
              <el-table-column label="客排" width="60">
                <template scope="scope">
                  <span title="客排">{{scope.row.r2}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="战意">
              <el-table-column label="主" width="100">
                <template scope="scope">
                  <span title="战意">{{scope.row.fighthome}}</span>
                </template>
              </el-table-column>
              <el-table-column label="客" width="100">
                <template scope="scope">
                  <span title="战意">{{scope.row.fightguest}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="近3场同主客赢盘率">
              <el-table-column label="主">
                <template scope="scope">
                  <span title="近3场同主客赢盘率">{{scope.row.near3homewinrate}}%</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="近20场主客赢盘率">
              <el-table-column label="主" width="45">
                <template scope="scope">
                  <span title="近20场主队胜率">{{scope.row.near20homewinrate}}%</span>
                </template>
              </el-table-column>
              <el-table-column label="客" width="45">
                <template scope="scope">
                  <span title="近20场客队胜率">{{scope.row.near20homewinrate}}%</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="近6场310盘路">
              <el-table-column label="主" width="70">
                <template scope="scope">
                  <span title="近6场主队310盘路">{{scope.row.near6homewin}}</span>
                </template>
              </el-table-column>
              <el-table-column label="客" width="70">
                <template scope="scope">
                  <span title="近6场客队310盘路">{{scope.row.near6guestwin}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="亚盘-排名比较">
              <el-table-column label="排名" width="60">
                <template scope="scope">
                  <span title="排名">{{scope.row.r1}}-{{scope.row.r2}}</span>
                </template>
              </el-table-column>
              <el-table-column label="排差盘口" width="100">
                <template scope="scope">
                  <span title="排差盘口">{{scope.row.rsub}} ()</span>
                </template>
              </el-table-column>
              <el-table-column label="比较" width="60"></el-table-column>
              <el-table-column label="倾向" width="60"></el-table-column>
            </el-table-column>
            <el-table-column label="近3场初欧同赔盘路">
              <el-table-column label="104" width="60">
                <template scope="scope">
                  <span title="104初欧同赔比分盘路">{{scope.row.same104}}</span>
                </template>
              </el-table-column>
              <el-table-column label="80" width="60">
                <template scope="scope">
                  <span title="80初欧同赔比分盘路">{{scope.row.same80}}</span>
                </template>
              </el-table-column>
              <el-table-column label="422" width="60">
                <template scope="scope">
                  <span title="422初欧同赔比分盘路">{{scope.row.same422}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="均欧初">
              <el-table-column label="3" width="50">
                <template scope="scope">
                  <span title="均欧初3">{{scope.row.avg3}}</span>
                </template>
              </el-table-column>
              <el-table-column label="1" width="50">
                <template scope="scope">
                  <span title="均欧初1">{{scope.row.avg1}}</span>
                </template>
              </el-table-column>
              <el-table-column label="0" width="50">
                <template scope="scope">
                  <span title="均欧初0">{{scope.row.avg0}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="均60">
              <el-table-column label="3" width="50">
                <template scope="scope">
                  <span title="60分钟均欧3">{{scope.row.avg603}}</span>
                </template>
              </el-table-column>
              <el-table-column label="1" width="50">
                <template scope="scope">
                  <span title="60分钟均欧1">{{scope.row.avg601}}</span>
                </template>
              </el-table-column>
              <el-table-column label="0" width="50">
                <template scope="scope">
                  <span title="60分钟均欧0">{{scope.row.avg600}}</span>
                </template>
              </el-table-column>
              <el-table-column label="型" width="50">
                <template scope="scope">
                  <span title="60分钟均欧型">{{scope.row.avgp60}}</span>
                </template>
              </el-table-column>
              <el-table-column label="占比" width="120">
                <template scope="scope">
                  <span title="60分钟均欧型占比" v-html="scope.row.avgtag60"></span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="均30">
              <el-table-column label="3" width="50">
                <template scope="scope">
                  <span title="30分钟均欧3">{{scope.row.avg303}}</span>
                </template>
              </el-table-column>
              <el-table-column label="1" width="50">
                <template scope="scope">
                  <span title="30分钟均欧1">{{scope.row.avg301}}</span>
                </template>
              </el-table-column>
              <el-table-column label="0" width="50">
                <template scope="scope">
                  <span title="30分钟均欧0">{{scope.row.avg300}}</span>
                </template>
              </el-table-column>
              <el-table-column label="型" width="50">
                <template scope="scope">
                  <span title="30分钟均欧型">{{scope.row.avgp30}}</span>
                </template>
              </el-table-column>
              <el-table-column label="占比" width="120">
                <template scope="scope">
                  <span title="30分钟均欧型占比" v-html="scope.row.avgtag30"></span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="均2">
              <el-table-column label="3" width="50">
                <template scope="scope">
                  <span title="2分钟均欧3">{{scope.row.avg23}}</span>
                </template>
              </el-table-column>
              <el-table-column label="1" width="50">
                <template scope="scope">
                  <span title="2分钟均欧1">{{scope.row.avg21}}</span>
                </template>
              </el-table-column>
              <el-table-column label="0" width="50">
                <template scope="scope">
                  <span title="2分钟均欧0">{{scope.row.avg20}}</span>
                </template>
              </el-table-column>
              <el-table-column label="型" width="50">
                <template scope="scope">
                  <span title="2分钟均欧型">{{scope.row.avgp2}}</span>
                </template>
              </el-table-column>
              <el-table-column label="占比" width="120">
                <template scope="scope">
                  <span title="2分钟均欧型占比" v-html="scope.row.avgtag2"></span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="平均倾向">
              <el-table-column label="60"></el-table-column>
              <el-table-column label="30"></el-table-column>
              <el-table-column label="2"></el-table-column>
              <el-table-column label="倾"></el-table-column>
            </el-table-column>
            <el-table-column label="Crown欧初">
              <el-table-column label="3" width="50">
                <template scope="scope">
                  <span title="Crown欧初3">{{scope.row.c3}}</span>
                </template>
              </el-table-column>
              <el-table-column label="1" width="50">
                <template scope="scope">
                  <span title="Crown欧初1">{{scope.row.c1}}</span>
                </template>
              </el-table-column>
              <el-table-column label="0" width="50">
                <template scope="scope">
                  <span title="Crown欧初0">{{scope.row.c0}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="545-60">
              <el-table-column label="3" width="50">
                <template scope="scope">
                  <span title="皇冠60分钟欧3">{{scope.row.c603}}</span>
                </template>
              </el-table-column>
              <el-table-column label="1" width="50">
                <template scope="scope">
                  <span title="皇冠60分钟欧1">{{scope.row.c601}}</span>
                </template>
              </el-table-column>
              <el-table-column label="0" width="50">
                <template scope="scope">
                  <span title="皇冠60分钟欧0">{{scope.row.c600}}</span>
                </template>
              </el-table-column>
              <el-table-column label="型" width="50">
                <template scope="scope">
                  <span title="皇冠60分钟欧型">{{scope.row.cp60}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="545-30">
              <el-table-column label="3" width="50">
                <template scope="scope">
                  <span title="皇冠30分钟欧3">{{scope.row.c303}}</span>
                </template>
              </el-table-column>
              <el-table-column label="1" width="50">
                <template scope="scope">
                  <span title="皇冠30分钟欧1">{{scope.row.c301}}</span>
                </template>
              </el-table-column>
              <el-table-column label="0" width="50">
                <template scope="scope">
                  <span title="皇冠30分钟欧0">{{scope.row.c300}}</span>
                </template>
              </el-table-column>
              <el-table-column label="型" width="50">
                <template scope="scope">
                  <span title="皇冠30分钟欧型">{{scope.row.cp30}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="545-2">
              <el-table-column label="3" width="50">
                <template scope="scope">
                  <span title="皇冠2分钟欧3">{{scope.row.c23}}</span>
                </template>
              </el-table-column>
              <el-table-column label="1" width="50">
                <template scope="scope">
                  <span title="皇冠2分钟欧1">{{scope.row.c21}}</span>
                </template>
              </el-table-column>
              <el-table-column label="0" width="50">
                <template scope="scope">
                  <span title="皇冠2分钟欧0">{{scope.row.c20}}</span>
                </template>
              </el-table-column>
              <el-table-column label="型" width="50">
                <template scope="scope">
                  <span title="皇冠2分钟欧型">{{scope.row.cp2}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="545初亚盘">
              <el-table-column label="主" width="50">
                <template scope="scope">
                  <span title="545初亚主水">{{scope.row.casian3}}</span>
                </template>
              </el-table-column>
              <el-table-column label="让" width="50">
                <template scope="scope">
                  <span title="545初亚盘">{{scope.row.casian1}}</span>
                </template>
              </el-table-column>
              <el-table-column label="客" width="50">
                <template scope="scope">
                  <span title="545初亚客水">{{scope.row.casian0}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="60水位">
              <el-table-column label="主" width="50">
                <template scope="scope">
                  <span title="545-60亚主水">{{scope.row.casian603}}</span>
                </template>
              </el-table-column>
              <el-table-column label="让" width="50">
                <template scope="scope">
                  <span title="545-60亚主盘">{{scope.row.casian601}}</span>
                </template>
              </el-table-column>
              <el-table-column label="客" width="50">
                <template scope="scope">
                  <span title="545-60亚客水">{{scope.row.casian600}}</span>
                </template>
              </el-table-column>
              <el-table-column label="盘差" width="60">
                <template scope="scope">
                  <span title="545-60盘差">{{scope.row.casianosub60}}</span>
                </template>
              </el-table-column>
              <el-table-column label="水差" width="60">
                <template scope="scope">
                  <span title="545-60水差">{{scope.row.casianwsub60}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="30水位">
              <el-table-column label="主" width="50">
                <template scope="scope">
                  <span title="545-30亚主水">{{scope.row.casian303}}</span>
                </template>
              </el-table-column>
              <el-table-column label="让" width="50">
                <template scope="scope">
                  <span title="545-30亚主盘">{{scope.row.casian301}}</span>
                </template>
              </el-table-column>
              <el-table-column label="客" width="50">
                <template scope="scope">
                  <span title="545-30亚客水">{{scope.row.casian300}}</span>
                </template>
              </el-table-column>
              <el-table-column label="盘差" width="60">
                <template scope="scope">
                  <span title="545-30盘差">{{scope.row.casianosub30}}</span>
                </template>
              </el-table-column>
              <el-table-column label="水差" width="60">
                <template scope="scope">
                  <span title="545-30水差">{{scope.row.casianwsub30}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="2水位">
              <el-table-column label="主" width="50">
                <template scope="scope">
                  <span title="545-2亚主水">{{scope.row.casian23}}</span>
                </template>
              </el-table-column>
              <el-table-column label="让" width="50">
                <template scope="scope">
                  <span title="545-2亚主盘">{{scope.row.casian21}}</span>
                </template>
              </el-table-column>
              <el-table-column label="客" width="50">
                <template scope="scope">
                  <span title="545-2亚客水">{{scope.row.casian20}}</span>
                </template>
              </el-table-column>
              <el-table-column label="盘差" width="60">
                <template scope="scope">
                  <span title="545-2盘差">{{scope.row.casianosub2}}</span>
                </template>
              </el-table-column>
              <el-table-column label="水差" width="60">
                <template scope="scope">
                  <span title="545-2水差">{{scope.row.casianwsub2}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="545倾向">
              <el-table-column label="60"></el-table-column>
              <el-table-column label="30"></el-table-column>
              <el-table-column label="2"></el-table-column>
              <el-table-column label="倾"></el-table-column>
            </el-table-column>
            <el-table-column label="澳门欧初">
              <el-table-column label="3" width="50">
                <template scope="scope">
                  <span title="澳门欧初3">{{scope.row.a3}}</span>
                </template>
              </el-table-column>
              <el-table-column label="1" width="50">
                <template scope="scope">
                  <span title="澳门欧初1">{{scope.row.a1}}</span>
                </template>
              </el-table-column>
              <el-table-column label="0" width="50">
                <template scope="scope">
                  <span title="澳门欧初0">{{scope.row.a0}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="80-60">
              <el-table-column label="3" width="50">
                <template scope="scope">
                  <span title="澳门60分钟欧3">{{scope.row.a603}}</span>
                </template>
              </el-table-column>
              <el-table-column label="1" width="50">
                <template scope="scope">
                  <span title="澳门60分钟欧1">{{scope.row.a601}}</span>
                </template>
              </el-table-column>
              <el-table-column label="0" width="50">
                <template scope="scope">
                  <span title="澳门60分钟欧0">{{scope.row.a600}}</span>
                </template>
              </el-table-column>
              <el-table-column label="型" width="50">
                <template scope="scope">
                  <span title="澳门60分钟欧型">{{scope.row.ap60}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="80-30">
              <el-table-column label="3" width="50">
                <template scope="scope">
                  <span title="澳门30分钟欧3">{{scope.row.a303}}</span>
                </template>
              </el-table-column>
              <el-table-column label="1" width="50">
                <template scope="scope">
                  <span title="澳门30分钟欧1">{{scope.row.a301}}</span>
                </template>
              </el-table-column>
              <el-table-column label="0" width="50">
                <template scope="scope">
                  <span title="澳门30分钟欧0">{{scope.row.a300}}</span>
                </template>
              </el-table-column>
              <el-table-column label="型" width="50">
                <template scope="scope">
                  <span title="澳门30分钟欧型">{{scope.row.ap30}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="80-2">
              <el-table-column label="3" width="50">
                <template scope="scope">
                  <span title="澳门2分钟欧3">{{scope.row.a23}}</span>
                </template>
              </el-table-column>
              <el-table-column label="1" width="50">
                <template scope="scope">
                  <span title="澳门2分钟欧1">{{scope.row.a21}}</span>
                </template>
              </el-table-column>
              <el-table-column label="0" width="50">
                <template scope="scope">
                  <span title="澳门2分钟欧0">{{scope.row.a20}}</span>
                </template>
              </el-table-column>
              <el-table-column label="型" width="50">
                <template scope="scope">
                  <span title="澳门2分钟欧型">{{scope.row.ap2}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="80初亚盘">
              <el-table-column label="主" width="50">
                <template scope="scope">
                  <span title="80初亚主水">{{scope.row.aasian3}}</span>
                </template>
              </el-table-column>
              <el-table-column label="让" width="50">
                <template scope="scope">
                  <span title="80初亚盘">{{scope.row.aasian1}}</span>
                </template>
              </el-table-column>
              <el-table-column label="客" width="50">
                <template scope="scope">
                  <span title="80初亚客水">{{scope.row.aasian0}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="60水位">
              <el-table-column label="主" width="50">
                <template scope="scope">
                  <span title="80-60亚主水">{{scope.row.aasian603}}</span>
                </template>
              </el-table-column>
              <el-table-column label="让" width="50">
                <template scope="scope">
                  <span title="80-60亚主盘">{{scope.row.aasian601}}</span>
                </template>
              </el-table-column>
              <el-table-column label="客" width="50">
                <template scope="scope">
                  <span title="80-60亚客水">{{scope.row.aasian600}}</span>
                </template>
              </el-table-column>
              <el-table-column label="盘差" width="60">
                <template scope="scope">
                  <span title="80-60盘差">{{scope.row.aasianosub60}}</span>
                </template>
              </el-table-column>
              <el-table-column label="水差" width="60">
                <template scope="scope">
                  <span title="80-60水差">{{scope.row.aasianwsub60}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="30水位">
              <el-table-column label="主" width="50">
                <template scope="scope">
                  <span title="80-30亚主水">{{scope.row.aasian303}}</span>
                </template>
              </el-table-column>
              <el-table-column label="让" width="50">
                <template scope="scope">
                  <span title="80-30亚主盘">{{scope.row.aasian301}}</span>
                </template>
              </el-table-column>
              <el-table-column label="客" width="50">
                <template scope="scope">
                  <span title="80-30亚客水">{{scope.row.aasian300}}</span>
                </template>
              </el-table-column>
              <el-table-column label="盘差" width="60">
                <template scope="scope">
                  <span title="80-30盘差">{{scope.row.aasianosub30}}</span>
                </template>
              </el-table-column>
              <el-table-column label="水差" width="60">
                <template scope="scope">
                  <span title="80-30水差">{{scope.row.aasianwsub30}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="2水位">
              <el-table-column label="主" width="50">
                <template scope="scope">
                  <span title="80-2亚主水">{{scope.row.aasian23}}</span>
                </template>
              </el-table-column>
              <el-table-column label="让" width="50">
                <template scope="scope">
                  <span title="80-2亚主盘">{{scope.row.aasian21}}</span>
                </template>
              </el-table-column>
              <el-table-column label="客" width="50">
                <template scope="scope">
                  <span title="80-2亚客水">{{scope.row.aasian20}}</span>
                </template>
              </el-table-column>
              <el-table-column label="盘差" width="60">
                <template scope="scope">
                  <span title="80-2盘差">{{scope.row.aasianosub2}}</span>
                </template>
              </el-table-column>
              <el-table-column label="水差" width="60">
                <template scope="scope">
                  <span title="80-2水差">{{scope.row.aasianwsub2}}</span>
                </template>
              </el-table-column>
            </el-table-column>
            <el-table-column label="80倾向">
              <el-table-column label="60"></el-table-column>
              <el-table-column label="30"></el-table-column>
              <el-table-column label="2"></el-table-column>
              <el-table-column label="倾"></el-table-column>
            </el-table-column>
            <el-table-column>
              <el-table-column label="综倾"></el-table-column>
            </el-table-column>
          </el-table>
        </div>
        <!--平均赔率全模板 结束-->

        <!--平均赔率简易模板 开始-->
        <el-table v-if="tagHead=='6-2'" :data="easyMonitorList" stripe>
          <el-table-column label="类型" width="100">
            <template scope="scope">
              <span title="联赛类型">{{scope.row.leaguetype}}</span>
              <br>
              <span title="pageid">
                <a target="_blank" :href="'https://vip.titan007.com/AsianOdds_n.aspx?id=' + scope.row.pageid + '&t=0&l=1'">{{scope.row.pageid}}</a>
              </span>
              <br>
              <span title="时间">{{scope.row.matchdatetime}}</span>
            </template>
          </el-table-column>
          <el-table-column label="主队" width="150">
            <template scope="scope">
              <span title="主队">{{scope.row.hometeam}}</span>
            </template>
          </el-table-column>
          <el-table-column label="采" width="40">
            <template scope="scope">
              <span title="初盘">初</span>
              <br>
              <span title="60分钟">60</span>
              <br>
              <span title="30分钟">30</span>
              <br>
              <span title="2分钟">2</span>
              <br>
            </template>
          </el-table-column>
          <el-table-column label="主" width="60">
            <template scope="scope">
              <span title="主" style="color: blue">{{scope.row.avg3}}</span>
              <br>
              <span v-if="scope.row.avg603<scope.row.avg3" title="60-3" style="color: green">{{scope.row.avg603}}</span>
              <span v-if="scope.row.avg603>scope.row.avg3" title="60-3" style="color: red">{{scope.row.avg603}}</span>
              <span v-if="scope.row.avg603==scope.row.avg3" title="60-3">{{scope.row.avg603}}</span>
              <br>
              <span v-if="scope.row.avg303<scope.row.avg3" title="30-3" style="color: green">{{scope.row.avg303}}</span>
              <span v-if="scope.row.avg303>scope.row.avg3" title="30-3" style="color: red">{{scope.row.avg303}}</span>
              <span v-if="scope.row.avg303==scope.row.avg3" title="30-3">{{scope.row.avg303}}</span>
              <br>
              <span v-if="scope.row.avg23<scope.row.avg3" title="2-3" style="color: green">{{scope.row.avg23}}</span>
              <span v-if="scope.row.avg23>scope.row.avg3" title="2-3" style="color: red">{{scope.row.avg23}}</span>
              <span v-if="scope.row.avg23==scope.row.avg3" title="2-3">{{scope.row.avg23}}</span>
              <br>
            </template>
          </el-table-column>
          <el-table-column label="和" width="60">
            <template scope="scope">
              <span title="和" style="color: blue">{{scope.row.avg1}}</span>
              <br>
              <span v-if="scope.row.avg601<scope.row.avg1" title="60-1" style="color: green">{{scope.row.avg601}}</span>
              <span v-if="scope.row.avg601>scope.row.avg1" title="60-1" style="color: red">{{scope.row.avg601}}</span>
              <span v-if="scope.row.avg601==scope.row.avg1" title="60-1">{{scope.row.avg601}}</span>
              <br>
              <span v-if="scope.row.avg301<scope.row.avg1" title="30-1" style="color: green">{{scope.row.avg301}}</span>
              <span v-if="scope.row.avg301>scope.row.avg1" title="30-1" style="color: red">{{scope.row.avg301}}</span>
              <span v-if="scope.row.avg301==scope.row.avg1" title="30-1">{{scope.row.avg301}}</span>
              <br>
              <span v-if="scope.row.avg21<scope.row.avg1" title="2-1" style="color: green">{{scope.row.avg21}}</span>
              <span v-if="scope.row.avg21>scope.row.avg1" title="2-1" style="color: red">{{scope.row.avg21}}</span>
              <span v-if="scope.row.avg21==scope.row.avg1" title="2-1">{{scope.row.avg21}}</span>
              <br>
            </template>
          </el-table-column>
          <el-table-column label="客" width="60">
            <template scope="scope">
              <span title="客" style="color: blue">{{scope.row.avg0}}</span>
              <br>
              <span v-if="scope.row.avg600<scope.row.avg0" title="60-0" style="color: green">{{scope.row.avg600}}</span>
              <span v-if="scope.row.avg600>scope.row.avg0" title="60-0" style="color: red">{{scope.row.avg600}}</span>
              <span v-if="scope.row.avg600==scope.row.avg0" title="60-0">{{scope.row.avg600}}</span>
              <br>
              <span v-if="scope.row.avg300<scope.row.avg0" title="30-0" style="color: green">{{scope.row.avg300}}</span>
              <span v-if="scope.row.avg300>scope.row.avg0" title="30-0" style="color: red">{{scope.row.avg300}}</span>
              <span v-if="scope.row.avg300==scope.row.avg0" title="30-0">{{scope.row.avg300}}</span>
              <br>
              <span v-if="scope.row.avg20<scope.row.avg0" title="2-0" style="color: green">{{scope.row.avg20}}</span>
              <span v-if="scope.row.avg20>scope.row.avg0" title="2-0" style="color: red">{{scope.row.avg20}}</span>
              <span v-if="scope.row.avg20==scope.row.avg0" title="2-0">{{scope.row.avg20}}</span>
              <br>
            </template>
          </el-table-column>
          <el-table-column label="欧总" width="60">
            <template scope="scope">
              <br>
              <span title="60分钟总开盘数量" v-if="scope.row.total60">({{scope.row.total60}})</span>
              <br>
              <span title="30分钟总开盘数量" v-if="scope.row.total30">({{scope.row.total30}})</span>
              <br>
              <span title="2分钟总开盘数量" v-if="scope.row.total2">({{scope.row.total2}})</span>
              <br>
            </template>
          </el-table-column>
          <el-table-column label="60占比" width="140">
            <template scope="scope">
              <span title="60分钟占比" style="color: red" v-html="scope.row.avgtag60"></span>
            </template>
          </el-table-column>
          <el-table-column label="30占比" width="140">
            <template scope="scope">
              <span title="30分钟占比" style="color: red" v-html="scope.row.avgtag30"></span>
            </template>
          </el-table-column>
          <el-table-column label="2占比" width="140">
            <template scope="scope">
              <span title="2分钟占比" style="color: red" v-html="scope.row.avgtag2"></span>
            </template>
          </el-table-column>
          <el-table-column label="客队" width="150">
            <template scope="scope">
              <span title="客队">{{scope.row.guestteam}}</span>
            </template>
          </el-table-column>
          <el-table-column label="比分">
            <template scope="scope">
              <span title="比分">{{scope.row.eh}} - {{scope.row.eg}}</span>
              <span v-if="scope.row.updatestatus==1"> (完)</span>
              <span v-else>&nbsp;<img src="@/assets/football.gif"></span>
            </template>
          </el-table-column>
          <el-table-column label="51-89.9%" width="100">
            <template scope="scope">
              <span v-if="scope.row.isbig51==1"><img src="@/assets/yes-one.png"></span>
            </template>
          </el-table-column>
          <el-table-column label="90-100%" width="100">
            <template scope="scope">
              <span v-if="scope.row.isbig90==1"><img src="@/assets/yes-one.png"></span>
            </template>
          </el-table-column>
        </el-table>
        <!--平均赔率简易板 结束-->

        <!--平均赔率实时模板 开始-->
        <el-table v-if="tagHead=='6-3'" :data="easyMonitorRealTimeList" stripe>
          <el-table-column label="类型" width="100">
            <template scope="scope">
              <span title="联赛类型">{{scope.row.leaguetype}}</span>
              <br>
              <span title="pageid">
                <a target="_blank" :href="'http://1x2.titan007.com/oddslist/' + scope.row.pageid + '_2.htm'">{{scope.row.pageid}}</a>
              </span>
              <br>
              <span title="时间">{{scope.row.matchdatetime}}</span>
            </template>
          </el-table-column>
          <el-table-column label="主队" width="150">
            <template scope="scope">
              <span title="主队">{{scope.row.hometeam}}</span>
            </template>
          </el-table-column>
          <el-table-column label="初3" width="80">
            <template scope="scope">
              <span>{{scope.row.avg3}}</span>
              <br>
              <span v-if="scope.row.realtime3<scope.row.avg3" style="color: green">{{scope.row.realtime3}}</span>
              <span v-if="scope.row.realtime3>scope.row.avg3" style="color: red">{{scope.row.realtime3}}</span>
              <span v-if="scope.row.realtime3==scope.row.avg3">{{scope.row.realtime3}}</span>
            </template>
          </el-table-column>
          <el-table-column label="初1" width="80">
            <template scope="scope">
              <span>{{scope.row.avg1}}</span>
              <br>
              <span v-if="scope.row.realtime1<scope.row.avg1" style="color: green">{{scope.row.realtime1}}</span>
              <span v-if="scope.row.realtime1>scope.row.avg1" style="color: red">{{scope.row.realtime1}}</span>
              <span v-if="scope.row.realtime1==scope.row.avg1">{{scope.row.realtime1}}</span>
            </template>
          </el-table-column>
          <el-table-column label="初0" width="80">
            <template scope="scope">
              <span>{{scope.row.avg0}}</span>
              <br>
              <span v-if="scope.row.realtime0<scope.row.avg0" style="color: green">{{scope.row.realtime0}}</span>
              <span v-if="scope.row.realtime0>scope.row.avg0" style="color: red">{{scope.row.realtime0}}</span>
              <span v-if="scope.row.realtime0==scope.row.avg0">{{scope.row.realtime0}}</span>
            </template>
          </el-table-column>
          <el-table-column label="占比" width="150">
            <template scope="scope">
              <span title="60分钟占比" style="color: red" v-html="scope.row.avgtag"></span>
            </template>
          </el-table-column>
          <el-table-column label="客队" width="150">
            <template scope="scope">
              <span title="客队">{{scope.row.guestteam}}</span>
            </template>
          </el-table-column>
          <el-table-column label="比分">
            <template scope="scope">
              <span title="比分">{{scope.row.eh}} - {{scope.row.eg}}</span>
              <span v-if="scope.row.updatestatus==1"> (完)</span>
              <span v-else>&nbsp;<img src="@/assets/football.gif"></span>
            </template>
          </el-table-column>
          <el-table-column label="51-89.9%" width="100">
            <template scope="scope">
              <span v-if="scope.row.isbig51==1"><img src="@/assets/yes-one.png"></span>
            </template>
          </el-table-column>
          <el-table-column label="90-100%" width="100">
            <template scope="scope">
              <span v-if="scope.row.isbig90==1"><img src="@/assets/yes-one.png"></span>
            </template>
          </el-table-column>
        </el-table>
        <!--平均赔率实时模板 结束-->

      </el-main>
      <!--右侧容器--内容模块 结束-->
    </el-container>

    <!--内容 结束-->
    <router-view/>
  </div>
</template>

<script>
export default {
  data() {
    //配置信息
    let configArr = [];

    //入库配置
    let typeInfoArr = [];

    //公司信息
    let companyInfoArr = [];

    //联赛信息
    let leagueInfoArr = [];

    //杯赛信息
    let cupInfoArr = [];

    //联赛数据
    const leagueMatchArr = [];

    //杯赛数据
    const cupMatchArr = [];

    //获取开放的联赛赛事类型
    const openLeagueList = [];

    //获取开放的杯赛赛事类型
    const openCupList = [];

    //获取对阵数据
    const opposeList = [];

    //主流胜率数据
    const rateList = [];

    //
    const betList = [];

    //监控列表全
    const avgMonitorList = []

    //监控列表平赔
    const easyMonitorList = []

    //监控实时平赔
    const easyMonitorRealTimeList = []

    //路径配置
    const tagIndex = '1-1';
    const path = '';
    const sleep = 0;
    const tagHead = '';
    const matchtype = '';
    const code = '';
    const leagueid = 0;
    const pagesize = 100;//默认每页记录数
    const currentpage = 1;//默认当前页
    const total = 0;//默认总记录数
    const pages = 0;//总页数

    return {
      tagIndex,//内容模块标签
      tagHead,
      configArr,
      typeInfoArr,
      companyInfoArr,
      openLeagueList,
      openCupList,
      leagueInfoArr,
      cupInfoArr,
      leagueMatchArr,
      cupMatchArr,
      path,
      sleep,
      matchtype,
      code,
      leagueid,
      currentpage,
      pagesize,
      total,
      pages,
      opposeList,
      rateList,
      betList,
      avgMonitorList,
      easyMonitorList,
      easyMonitorRealTimeList,

      drawer: false,
      labelPosition: 'right',
      config: {
        path: '',
        sleep: ''
      }
    }
  },

  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },

    handleCurrentChange(currentpage) {
      console.log(`当前页: ${currentpage}`);

      //获取联赛数据
      this.loadMatchInfoByMatchTypeAndCodeAndLeagueId(this.matchtype, this.code, this.leagueid, currentpage, this.pagesize);
    },

    //修改路径信息
    updatdConfig(path, sleep) {
      this.$confirm('修改python采集生成文件路径?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.config.path = path;
        this.config.sleep = sleep;

        this.axios.post('/api/20001/info/configinfo/update?', this.config);
        this.$message({
          type: 'success',
          message: '修改成功!'
        });
        this.drawer = false
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消修改'
        });
      });
    },

    //获取配置信息
    loadConfigInfo() {
      let self = this;
      //获取路径配置
      this.axios.get("/api/20001/info/configinfo/list").then(function (response) {
        self.configArr = response.data.data;
        self.path = response.data.data[0].path;
        self.sleep = response.data.data[0].sleep;
      })
    },

    //获取入库配置
    loadTypeInfo() {
      let self = this;
      this.axios.get("/api/20001/info/typeinfo/list").then(function (response) {
        self.typeInfoArr = response.data.data
      })
    },

    //获取公司信息
    loadCompanyInfo() {
      let self = this;
      this.axios.get("/api/20001/info/companyinfo/list").then(function (response) {
        self.companyInfoArr = response.data.data
      })
    },

    //获取开放的联赛赛事类型
    loadOpenLeagueList() {
      let self = this;
      this.axios.get("/api/20001/info/leagueinfo/openleaguelist").then(function (response) {
        self.openLeagueList = response.data.data;
      })
    },

    //获取开放的杯赛赛事类型
    loadOpenCupList() {
      let self = this;
      this.axios.get("/api/20001/info/leagueinfo/opencuplist").then(function (response) {
        self.openCupList = response.data.data;
      })
    },

    //获取联赛类型
    loadLeagueInfo() {
      let self = this;

      this.axios.get("/api/20001/info/leagueinfo/list").then(function (response) {
        self.leagueInfoArr = response.data.data;
      })
    },

    //获取杯赛类型
    loadCupInfo() {
      let self = this;
      this.axios.get("/api/20001/info/cupinfo/list").then(function (response) {
        self.cupInfoArr = response.data.data;
      })
    },

    //获取赛事数据
    loadMatchInfoByMatchTypeAndCodeAndLeagueId(matchtype, code, leagueid, currentpage, pagesize) {
      let self = this;

      let url = "/api/20002/match/list/matchtype/" + matchtype + "/code/" + code + "/leagueid/" + leagueid + "/page/" + currentpage + "/pagesize/" + pagesize

      this.axios.get(url).then(function (response) {
        self.matchtype = matchtype;
        self.code = code;
        self.leagueid = leagueid;
        self.currentpage = currentpage;
        self.pagesize = pagesize;
        self.pages = response.data.totalPages;
        self.total = response.data.totalCount;

        //获取联赛或杯赛赛事数据
        if (matchtype == 'league') {
          self.leagueMatchArr = response.data;
        } else {
          self.cupMatchArr = response.data;
        }
      })
    },

    //获取对阵数据
    loadOpposeInfoByLeagueId(leagueid) {
      let self = this;
      const url = "/api/20002/match/list/oppose/leagueid/" + leagueid;
      this.axios.get(url).then(function (response) {
        self.opposeList = response.data.data;
      })
    },

    //主流胜率数据
    loadRateInfoByLeagueIdAndRateTag(leagueid, relation) {
      let self = this;
      const url = "/api/20001/info/list/rate";
      let postData = {
        'leagueid': leagueid,
        'relation': relation
      }
      this.axios.post(url, postData).then(function (response) {
        self.rateList = response.data.data;
      })
    },

    //获取今日推荐
    loadBetList() {
      let self = this;
      const season = '2022-2023';
      const url = "/api/20002/match/list/betlist/season/" + season;
      this.axios.get(url).then(function (response) {
        self.betList = response.data.data;
      });
    },

    // 获取监控表全数据
    loadMonitorAll(){
      let self = this;
      const url = "/api/20001/info/monitor/avg/all";
      this.axios.get(url).then(function (response) {
        self.avgMonitorList = response.data.data;
      });
    },

    // 获取监控表平赔数据
    loadMonitorEasy(){
      let self = this;
      const url = "/api/20001/info/monitor/avg/easy";
      this.axios.get(url).then(function (response) {
        self.easyMonitorList = response.data.data;
      });
    },

    loadMonitorEasyRealTime(){
      let self = this;
      const url = "/api/20003/crawler/easy/realtime";
      this.axios.get(url).then(function (response) {
        self.easyMonitorRealTimeList = response.data.data;
      });
    },

    //更新单个赛事的文件
    updateOddsByLeagueIdAndPageIdAndSeasonAndRounds(leagueid, pageid, season, rounds){
      document.getElementById('updateodds_' + pageid).innerText = "正在更新盘口数据，请等待更新完成！";
      let self = this;
      const url = "/api/20003/crawler/update/odds/leagueid/" + leagueid + "/pageid/" + pageid + "/season/" + season + "/rounds/" + rounds;
      this.axios.get(url).then(function (response) {
        self.avgMonitorList = response.data.data;
        document.getElementById('updateodds_' + pageid).innerText = "更新盘口数据完成！";
        document.getElementById('updateodds_' + pageid).style.display = "block";
      });
    },

    //修改入库信息
    switchInfo(type, id, field, value) {
      let updateInfo = {
        'type': type,
        'id': id,
        'field': field,
        'value': value,
      };

      this.axios.post('/api/20001/info/update?', updateInfo);
    },

    //点击菜单，调到对应内容
    menuChange(index) {
      let self = this;
      self.tagIndex = index;

      let tmpTag = index.split('-');
      self.tagHead = tmpTag[0] + '-' + tmpTag[1];
    }
  },

  //初始化配置
  created() {
    this.loadConfigInfo();//获取配置信息
    this.loadTypeInfo();//获取入库配置
    this.loadCompanyInfo();//获取公司信息
    this.loadLeagueInfo();//获取联赛信息
    this.loadCupInfo();//获取杯赛信息
    this.loadOpenLeagueList();//获取开放的联赛赛事类型
    this.loadOpenCupList();//获取开放的杯赛赛事类型
  }
}
</script>

<style>
* {
  margin: 0;
}

.el-header {
  background-color: #990000;
  color: #fff;
  line-height: 60px;
  font-weight: bold;
  font-size: 30px;
  text-align: center;
}

.el-aside {
  color: black;
}

.statistics {
  color: blue;
}

.info {
  color: #dd524d;
}
</style>
